package com.android.thought.badboys.Info;

import java.io.Serializable;
import java.util.Comparator;

import android.util.Log;


public class CallInfo implements Serializable , Comparator<CallInfo>{
	
	private static final long serialVersionUID = 9158370251539362258L;
	
	// CallLog.Calls.OUTGOING_TYPE ( 발신) 
			// CallLog.Calls.INCOMING_TYPE ( 수신) 
			// CallLog.Calls.MISSED_TYPE ( 부재중)
				
	/**
	 * 
	 */
	
	String mName;
	int mType = -1;
	String mNumber;
	long mTime = 0;
	long mDuration = 0;
	
	public void setTime(long time) { 
		this.mTime = time;
	}
	
	public void setDuration (long duration) { 
		this.mDuration = duration;
	}
	
	public void setName(String name) { 
		this.mName = name;
	}
	
	public void setNumber(String number) { 
		this.mNumber = number;
	}
	
	public void setType(int type) { 
		this.mType = type;
	}
	
	//////////////////
	public long getTime() {
		return this.mTime;
	}
	
	public long getDuration () {
		return this.mDuration;
	}
	
	public String getName() { 
		return this.mName;
	}
	
	public String getNumber() { 
		return this.mNumber;
	}
	
	public int getType() { 
		return this.mType;
	}
	

	@Override
	public int compare(CallInfo lhs, CallInfo rhs) {
		return (int) ((rhs.getTime()/100)  - (lhs.getTime() / 100)   );
	}
	
}
